package com.neutech.neureg.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.neutech.neureg.service.RegServiceImpl;
import com.neutech.po.NeuReg;


@Controller
@RequestMapping("/reg")
public class RegController {
	@Autowired
	private RegServiceImpl regService;
	@RequestMapping("/findNeuRegById")
	public @ResponseBody NeuReg findNeuRegById(Integer id) throws Exception{
		NeuReg neureg = regService.findNeuRegById(id);	
		return neureg;		
	}
	@RequestMapping(value="/updateNeuRegById",method=RequestMethod.POST)
	public @ResponseBody void updateNeuRegById() throws Exception{
		regService.updateNeuRegById();	
	}
	@RequestMapping("/deleteNeuRegById")
	public @ResponseBody  void deleteNeuRegById(Integer id) throws Exception{
		regService.deleteNeuRegById(id);;		
	}
	@RequestMapping("/addNeuReg")
	public @ResponseBody void addNeuReg() throws Exception{
		regService.addNeuReg();		
	}
}